//index.js
//获取应用实例
const app = getApp()
const getCurrentPagesApi = require('../../utils/common').getCurrentPagesApi;
var WxParse = require('../../wxParse/wxParse.js');
const banner = require('../../config').banner
const host = require('../../config').host
Page({
  data: {
    canIUse: wx.canIUse("button.open-type.getUserInfo"),
  },
  
  onShareAppMessage: function (res) {
    if (res.from === 'menu') {
      return {
        title: '国数源-Заказать параметры',
        path: getCurrentPagesApi()
      }
    }
  },
  onLoad: function () {
    // console.log('ddd');
  },
  getUserInfo: function(e) {
    // console.log(e)
    app.globalData.userInfo = e.detail.userInfo
    this.setData({
      userInfo: e.detail.userInfo,
      hasUserInfo: true
    })
  }
})
